<?php

namespace app\admin\validate\shop\delivery;

use think\Validate;

class Template extends Validate
{
    protected $failException = true;

    /**
     * 验证规则
     */
    protected $rule = [
        'name'        => 'require',
        'type'        => 'require',
        'detail_data' => 'require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'name.require'        => '模板名称不能为空',
        'type.require'        => '计费方式不能为空',
        'detail_data.require' => '运费明细不能为空',
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];

}
